cmake_minimum_required (VERSION 2.6)
project ("Ejercicio1")

set(SRC_DIR src/)
set(OUT_DIR bin/)
set(CMAKE_BUILD_TYPE Debug)

include_directories("${SRC_DIR}")
include_directories("${SRC_DIR}IPC")
include_directories("${SRC_DIR}common")
include_directories("${SRC_DIR}Middleware")
include_directories("${SRC_DIR}logger")

AUX_SOURCE_DIRECTORY ("${SRC_DIR}IPC" COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR}common" COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR}Middleware" COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR}logger" COMMON_SRC)

file(MAKE_DIRECTORY ${OUT_DIR})

add_executable(${OUT_DIR}launcher   ${SRC_DIR}launcher.cpp   ${SRC_DIR}Puerta.cpp ${COMMON_SRC} )
add_executable(${OUT_DIR}persona    ${SRC_DIR}persona.cpp    ${SRC_DIR}Puerta.cpp ${COMMON_SRC} )
add_executable(${OUT_DIR}persona2   ${SRC_DIR}persona2.cpp   ${SRC_DIR}Puerta.cpp ${COMMON_SRC} )
add_executable(${OUT_DIR}puerta     ${SRC_DIR}puerta.cpp     ${SRC_DIR}Puerta.cpp ${COMMON_SRC} )
add_executable(${OUT_DIR}terminator ${SRC_DIR}terminator.cpp ${SRC_DIR}Puerta.cpp ${COMMON_SRC} )